package com.cisdi.info.mh.dao.User;

import com.cisdi.info.simple.dto.base.PageDTO;
import com.cisdi.info.mh.entity.User.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
@Component(value = "userDao")
public interface UserDao {

    public List<User> findUsers(PageDTO pageDTO);

    public List<User> findAllUsers();

    public List<User> findAllUsersWithIdName();

    public List<User> findUsersWithIdNameByName(@Param("userName") String userName);

    public User findUsersWithIdNameById(@Param(" userId") Long userId);

    public Long findUserTotalCount(PageDTO pageDTO);

    public User findUser(@Param("userId") Long userId);

    //所有外键的Name都以加载
    public User findUserWithForeignName(@Param("userId") Long userId);

    public Integer saveUser(User user);

    public Integer updateUser(User user);

    public Integer deleteUser(@Param("userId") Long userId);
}
